********************************************************************************
* Exporting table for multi-country COVID paper (BGD3 sample)
* last updated: 2020-10-12
* Salim Benhachmi
********************************************************************************

clear all
use "$da/BGD4", clear

********************************************************************************

* Drop in income
gen drop_inc = (ec_q12 > ec_q11) if ec_q12 != . & ec_q11 != . 

* increase in income
gen incr_inc = (ec_q12 < ec_q11) if ec_q12 != . & ec_q11 != . 

********************************************************************************

keep if covid_sample == 1

local indicators drop_inc incr_inc

foreach ind of local indicators {
	sum `ind'
	loc mean_`ind' : di %10.2fc r(mean)
}

loc ratio = round(`mean_drop_inc' / `mean_incr_inc', 0.1)

clear
set obs 1

gen drop_inc = "`mean_drop_inc'"
gen incr_inc = "`mean_incr_inc'"
gen ratio = "`ratio'"

export excel using "$dtab/Inverse Table.xlsx", sheetmodify cell(B9)

********************************************************************************
